{% if en %}
<table id="scoreboard" class="table table-striped border">
    <thead>
    <tr>
        <th class="border-right" data-checkbox>
            <div class="form-check text-center">
                <input type="checkbox" class="form-check-input" id="users-bulk-select" autocomplete="off" data-checkbox-all>&nbsp;
            </div>
        </th>
        <th class="sort-col text-center"><b>Place</b></th>
        <th class="sort-col"><b>User</b></th>
        <th class="sort-col"><b>Score</b></th>
        <th class="sort-col"><b>Visibility</b></th>
    </tr>
    </thead>
    <tbody>
    {% for standing in user_standings %}
    <tr data-href="{{ url_for('admin.users_detail', user_id=standing.user_id) }}">
        <td class="border-right text-center" data-checkbox>
            <div class="form-check">
                <input type="checkbox" class="form-check-input" value="{{ standing.user_id }}" autocomplete="off" data-user-id="{{ standing.user_id }}">&nbsp;
            </div>
        </td>
        <td class="text-center" width="10%">{{ loop.index }}</td>
        <td>
            <a href="{{ url_for('admin.users_detail', user_id=standing.user_id) }}">
                {{ standing.name }}
                {% if standing.oauth_id %}
                {% if get_config('user_mode') == 'teams' %}
                <a href="https://majorleaguecyber.org/t/{{ standing.name }}">
                    <span class="badge badge-primary">Official</span>
                </a>
                {% elif get_config('user_mode') == 'users' %}
                <a href="https://majorleaguecyber.org/u/{{ standing.name }}">
                    <span class="badge badge-primary">Official</span>
                </a>
                {% endif %}
                {% endif %}
            </a>
        </td>
        <td>{{ standing.score }}</td>
        <td>
            {% if standing.hidden %}
            <span class="badge badge-danger">hidden</span>
            {% else %}
            <span class="badge badge-success">visible</span>
            {% endif %}
        </td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% else %}
<table id="scoreboard" class="table table-striped border">
    <thead>
    <tr>
        <th class="border-right" data-checkbox>
            <div class="form-check text-center">
                <input type="checkbox" class="form-check-input" id="users-bulk-select" autocomplete="off" data-checkbox-all>&nbsp;
            </div>
        </th>
        <th class="sort-col text-center"><b>名次</b></th>
        <th class="sort-col"><b>用户</b></th>
        <th class="sort-col"><b>得分</b></th>
        <th class="sort-col"><b>可见性</b></th>
    </tr>
    </thead>
    <tbody>
    {% for standing in user_standings %}
    <tr data-href="{{ url_for('admin.users_detail', user_id=standing.user_id) }}">
        <td class="border-right text-center" data-checkbox>
            <div class="form-check">
                <input type="checkbox" class="form-check-input" value="{{ standing.user_id }}" autocomplete="off" data-user-id="{{ standing.user_id }}">&nbsp;
            </div>
        </td>
        <td class="text-center" width="10%">{{ loop.index }}</td>
        <td>
            <a href="{{ url_for('admin.users_detail', user_id=standing.user_id) }}">
                {{ standing.name }}
                {% if standing.oauth_id %}
                {% if get_config('user_mode') == 'teams' %}
                <a href="https://majorleaguecyber.org/t/{{ standing.name }}">
                    <span class="badge badge-primary">Official</span>
                </a>
                {% elif get_config('user_mode') == 'users' %}
                <a href="https://majorleaguecyber.org/u/{{ standing.name }}">
                    <span class="badge badge-primary">Official</span>
                </a>
                {% endif %}
                {% endif %}
            </a>
        </td>
        <td>{{ standing.score }}</td>
        <td>
            {% if standing.hidden %}
            <span class="badge badge-danger">隐藏</span>
            {% else %}
            <span class="badge badge-success">显示</span>
            {% endif %}
        </td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% endif %}
